1) Field of the Invention
The present invention relates to a technology for reading of data stored in a recording medium, and more particularly to a technology for reading data stored in a recording medium and correcting an error in the data read.
2) Description of the Related Art
An information storage device that reads and writes information (data) from and to a recording medium, such as a magnetic disk and an optical disk, is used as a storage device for various systems, such as a personal computer and a server.
When an information storage device receives a write instruction from a host, such as a personal computer and a server, to record data in a recording medium, the information storage device modulates data to be recorded using a predetermined modulation system, and stores the data, which is modulated, in the recording medium. When the information storage device receives a read instruction from the host to read data from the recording medium, the information storage device demodulates the data to be read using a predetermined demodulation system, and outputs the data, which is demodulated, to the host. Sometimes during such reading process, a flaw on the recording medium causes an error in the data. Therefore, the information storage device generally adds, at writing of the data, an error correcting code (ECC) for correcting such error in advance to perform error correction on the data that is read.
On the other hand, in the various systems, speedup of processing is demanded. Therefore, speedup is also required regarding data reading from the information storage device, and various techniques have been proposed.
For example, in a conventional technology disclosed in Japanese Patent Application Laid-Open No. H6-202819, a disk device performs, after reading data from a recording medium and storing the data in a buffer memory, error correction on the data while reading the data. The disk device transmits the data of which an error is corrected to a host without writing the data again in the buffer memory. Specifically, an optical disk controller controls an optical disk driving unit via an enhanced small device interface (ESDI) unit to read information recorded on an optical disk. The optical disk controller transfers user data in the information to the buffer memory and an error detecting unit. Then, the optical disk controller transfers the ECC included in the information to the error detecting unit. The optical disk controller reads user data stored in the buffer memory one byte by one byte to transfer the user data to a small computer system interface (SCSI) controller. The error detecting unit detects a bit error in the user data based on the ECC, and sequentially transfers error information that indicates positions of the bit errors to the SCSI controller one byte by one byte. The SCSI controller corrects the bit error based upon the error information and temporarily stores the user data corrected in a first-in first-out (FIFO) circuit. The SCSI controller then outputs the user data stored to the host without writing the user data corrected again in the buffer memory.
There are two modes for the error correction based on the ECC. One is an on-the-fly mode and the other is an erasure mode. In the on-the-fly mode, a position of an error in data is detected based on the ECC, and a piece of data at the position detected is corrected. In the erasure mode, a position of an error in data is designated, and a piece of data at the position designated is corrected.
In the on-the-fly mode, ECC constituted of two symbols is required for correcting data constituted of one symbol, and in the erasure mode ECC constituted of one symbol is required for correcting data constituted of one symbol. For example, when a total number of symbols constituting data and ECC in one data sector is represented as n and the ECC is constituted of four symbols, error correction on data constituted of two symbols can be made in the on-the-fly mode, while error correction on data constituted of four symbols can be made in the erasure mode. In other words, in a data sector having data constituted of (n−4) symbols and ECC constituted of four symbols, when an error occurs in data constituted of three or more symbols, the data can not be corrected in the on-the-fly mode, and when an error occurs in data constituted of five symbols, the data can not be corrected in the erasure mode.
In the above conventional technology, when the error correction can not be successfully performed by an arithmetic processing based on the ECC, it is necessary to read out the information from the optical disk again. Therefore, much time is required for the error correction.
In a magnetic disk device for which a magnetic disk, in which information is recorded using magnetism, as a recording medium, when an error position can be identified by thermal asperity (TA), the error correction can be conducted in the erasure mode. However, it is impossible to identify a position of an error on data due to a failure in the magnetic disk. Therefore, the error correction in the on-the-fly mode can only be performed, resulting that a correction length can not be elongated.
If the error correction in the erasure mode is performed to elongate the correction length, it is necessary to vary a position at which the error correction in the erasure mode is performed since the position of an error can not be identified. Therefore, until the position of the error matches the position at which the error correction is performed, the information is read from the magnetic disk for many times, consuming a lot of time for the error correction.